Setting up Google Web Traffic Analytics

There are two options for setting up Web Traffic Analytics.

Tracking Your Entire Web Site

Tracking a Single Page

See Also: Setting up Web Analytics for Multiple Sites or Providers

Tracking Your Entire Web Site

Follow these steps to set up the default Web Analytics provider, Google Analytics, to track your entire site.

Warning! Enabling the tracking code may cause a significant increase in CPU usage.

1. Create a Gmail account (http://mail.google.com).

2. Sign up for Google Web Analytics (www.google.com/analytics/).

When you set up a Google Web Analytics profile for your site, you are assigned a profile ID and a User Account. You will need those to complete Step 7.

3. On the server that hosts Ektron CMS400.NET, go to C:\Program Files\Ektron\CMS400v8x\Utilities\EncryptEmailPassword.exe.

4. Use that utility to encrypt the Gmail username and password that you obtained in Step 1.

5. Open your site’s siteroot/web.config file.

6. Find the AnalyticsDataProvider tag, shown below.

<AnalyticsDataProvider defaultProvider="Google">
     <providers>
       <add name="Google" type="Ektron.Cms.Analytics.Providers.GoogleAnalyticsProvider, 
Ektron.Cms.BusinessObjects" Username="" Password="" ProfileId="" SiteURL="" UserAccount="" 
GoogleAnalyticsTrackingCodePath="Analytics\template\googletrackingcode.ascx" />
     </providers>
</AnalyticsDataProvider>

Note: If your web.config has several analytics providers and you want to turn off analytic tracking for one of them, delete the value of the GoogleAnalyticsTrackingCodePath property.

7. Use the following table to complete the tag’s properties.

Element

Enter

name

The free text name of the site being tracked.

Ektron suggests the site name followed by the provider name. For example, www.ektron.com-Google.

Site-level displays of Web Analytics data within the Ektron CMS400.NET Workarea let you choose a site from a dropdown, as shown below.

Warning! If you change the name, you must also change the value of the <AnalyticsDataProvider defaultProvider element to match the name.

Username

The Gmail username you encrypted in Step 4.

Password

The Gmail password you encrypted in Step 4.

ProfileID

The Google Analytics Profile ID you obtained in Step 2.

Note: Tip! If you go to your Google Analytics dashboard at google.com, in the address bar, the &id= value in the URL is your ProfileId assigned by Google.

SiteURL

Your site root names. For example, you could set up one <providers> tag for the dev.ektron.com site, and another for the synergy.ektron.com site.

Do not include a protocol, such as http://.

The SiteURL needs to match the development site URL when you test in your development environment. For example, if the site path is http://MyDevMachine/default.aspx, the SiteURL attribute needs to be MyDevMachine.

If there is no match, the Google beacon is not inserted onto your page.

UserAccount

The Google Analytics SiteURL you obtained in Step 2.

Note: Tip! When you visit your Google Analytics Settings page at google.com, the UA-xxxxxx-x string next to your site domain is the UserAccount assigned by Google.

8. Within the web.config's <analyticsSettings> tags is a suppressBeacon element that lets you track or suppress tracking users on your Web site. Many site administrators do not want to track CMS user behavior in analytics reports, as it corrupts the data.

The following table lists possible settings for this element.

Value

Description

none

Track all users, including authenticated membership and Ektron CMS400.NET users.

members

Track unauthenticated and logged-in Ektron CMS400.NETusers only. Do not track membership users.

authors

Track unauthenticated and logged-in membership users only. Do not track Ektron CMS400.NETusers.

all

Track unauthenticated users only. Do not track membership and Ektron CMS400.NETusers

9. Within the web.config's <appSettings> tags is an ek_AutoInsertBeaconScript element that either tracks or suppresses tracking activity on your Web site.

10. Change its value to true.

11. Save web.config.

Important: No special server control is needed to track Web Analytics. After you enable Web Analytics in the web.config file, the following JavaScript is automatically added to each PageBuilder page and any site page that contains an Ektron CMS400.NET server control.

<!-- Start Google Code -->
  <script type="text/javascript">
     var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
     document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' 
        type='text/javascript'%3E%3C/script%3E"));
   </script>
   <script type="text/javascript">
     try {
     var pageTracker = _gat._getTracker("[USER ACCOUNT STRING]");
     pageTracker._trackPageview();
     } catch(err) {}</script>
  <!-- End Google Code -->

Note: Your User account string is provided by Google Web Analytics.

Tracking a Single Page

As an alternative to tracking your entire site, you can track any number of individual .aspx pages. To do that, follow these steps on every page you wish to track.

Prerequisite: You completed all steps in Tracking Your Entire Web Site

1. Open your site’s siteroot/web.config file.

2. Find the ek_AutoInsertBeaconScript tag.

3. Set its value to false.

4. Save web.config.

Note: The above steps disable the tracking code on your Web site.

5. Open Visual Studio.

6. Open the .aspx page to which you want to apply the tracking code.

7. In the Solution Explorer tree, navigate to Workarea/Analytics/template/googletrackingcode.ascx.

8. Drag and drop that user control onto the page.

9. Assign EktronAnalyticsTrackingCode as the ID of the control.

Setting up Web Analytics for Multiple Sites or Providers

To track multiple providers or sites, copy the contents of the <providers> tag, paste it below the existing tag and above </AnalyticsDataProvider>, and modify the elements listed in Step 7 above.

(continued in Authorization to View Web Traffic Analytics Data)

Previous TopicNext Topic|